MODULE mainvariables

    USE constants

    IMPLICIT NONE

      integer nsl,nos,nsp,nrp,cspec,ccols,crows

      parameter (nos=1)         ! number of soils
      parameter (nsp=16)        ! number of soilparameters
      parameter (nrp=10)        ! number of soilrespparameters
      parameter (nsl=4)         ! number of soillayers + 1 !!!

      parameter (cspec=1)       ! max. number of crop species
      parameter (ccols=6)       ! number of columns in the cropparameterfile
      parameter (crows=10)      ! number of rows in the cropparameterfile


!      common/tttest/cutcntt
!      common/FVCcalc/seasonstart,seasonend


 !     character*50     filename,header
      character*50 header

      integer          k,jd,yy,droughtflag,cutcnt,cutcntt,x,xx,xxx
      integer, parameter :: bodart = 1, veg = 1, sstart = 120
      real, PARAMETER ::             maxLAI = 5.
      double precision ca,gfac,trans,pgros,xxtair,xxsst, &
                      humidity,xxdire,xxdiff,vint
      double precision cosza,omega,cosza_flat
      double precision sresp,hr
      real             trans_slp,pgros_slp,sresp_slp,newLAI, &
                      canopytrans,ww,dresp_slp,lfwt,stwt,agb, &
                      grain,grwt,rain,rtwt
      double precision intrv,finterc,intercmax,gapf,bhoe,atmpress

      !Longitude in degrees (E of Greenwich is negative)

      double precision, parameter :: longitude=-128.28

      double precision rad_lat,ewair,ewtp,vpd

      double precision smatrix(nsp,nsl,nos),rmatrix(nrp,nsl,nos)
      real             xtair,xhumid,xrain,xwind,xdire,xdiff
!-------------------------------------------------------------
      double precision cmatrix(ccols,crows,cspec)
      double precision pg,dw,rm,tlai,hsum,tsenlai,startww
      integer          stage,emergedate,sowdate, &
                      seasonstart,seasonend,harvest
      double precision ctrans,radsoil,xpsi1,xpsi2,xpsi3,cantmp, &
                      darkresp,cangl,xxxpsi,yyypsi,laistart
      double precision thet1,thet2,thet3,soiltmp1,soiltmp2,soiltmp3
      double precision xpsi_1,xpsi_2,xpsi_3
      integer          irrigationflag
!-------------------------------------------------------------

CONTAINS

 SUBROUTINE initconstants()

!     Latitude in radians
      rad_lat=38.19*Pi/180

 END SUBROUTINE initconstants


END MODULE mainvariables
